package com.zx.template.pojo.dto;

import com.zx.template.base.BaseDto;
import com.zx.template.base.ValidationGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author szh
 * @date 2022/8/3 14:06
 */
@ApiModel(description = "新增套餐dto")
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class VipConfigDto extends BaseDto<VipConfigDto> {
    /**
     * 会员类型名称
     */
    @ApiModelProperty(value = "会员类型名称",required = true)
    @NotBlank(message = "会员类型名称 不能为空",groups = {ValidationGroup.Add.class})
    @Length(max = 15,groups = {ValidationGroup.Add.class})
    private String typeName;

    /**
     * 原价
     */
    @ApiModelProperty("原价")
    @NotNull(message = "原价 不能为空",groups = {ValidationGroup.Add.class})
    @Range(min = 1,message = "原价 不能小于1",groups = {ValidationGroup.Add.class})
    private BigDecimal originalPrice;

    /**
     * 折扣金额
     */
    @ApiModelProperty("折扣金额")
    @NotNull(message = "折扣金额 不能为空",groups = {ValidationGroup.Add.class})
    private BigDecimal discountAmount;


    /**
     * 会员天数
     */
    @ApiModelProperty("会员天数")
    @NotNull(message = "会员天数 不能为空",groups = {ValidationGroup.Add.class})
    @Range(min = 1,message = "会员天数 不能小于1",groups = {ValidationGroup.Add.class})
    private Integer days;

    /**
     * 置顶天数
     */
    @ApiModelProperty("置顶天数")
    @NotNull(message = "置顶天数 不能为空",groups = {ValidationGroup.Add.class})
    @Range(min = 1,message = "置顶天数 不能小于1",groups = {ValidationGroup.Add.class})
    private Integer topDays;



}
